const state = {
    user: {}
}
const actions = {
    saveLogin: ({ commit }, payload) => {
        console.log(payload)
        commit('LOGIN', payload)
    }
}

const mutations = {
    LOGIN: (state, payload) => {
        state.user = payload.result
    }
}

const getters = {
    getUser: state => state.user
}

export default {
    state,
    mutations,
    actions,
    getters
}